/**
 * ActionAddCircleObstacle
 *
 * @created Mar 1, 2007
 * @author jprieur
 *
 */
package mygui;

import java.awt.event.*;
import javax.swing.*;

import kernel.Simulator;

public class ActionAddCircleObstacle extends AbstractAction
{

    MonIHM _gui;

    public ActionAddCircleObstacle(MonIHM gui)
    {
	_gui = gui;
	putValue(AbstractAction.NAME, "Add a circle obstacle");
	putValue(AbstractAction.SHORT_DESCRIPTION, "Add a circle obstacle");
	putValue(AbstractAction.ACCELERATOR_KEY,
		 KeyStroke.getKeyStroke(KeyEvent.VK_R, KeyEvent.CTRL_MASK));
	putValue(AbstractAction.SMALL_ICON,
		 UIM.createImageIcon("images/ellipse.png","Add a mobile Station"));
    }

    public void actionPerformed(ActionEvent e)
    {
	_gui.leaveModes();
	_gui.getAffichage().setMode(DisplayPanel.Mode.CIRCLE_OBSTACLE_ADD);
    }

}